package com.insurance.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 投保单
 * 
 * @date 2020-09-15 14:24:28
 */
@ApiModel(value = "投保单")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ProposalDto implements Serializable {

	@ApiModelProperty(value = "投保单id")
	private String proposalId;

	@ApiModelProperty(value = "投保单号")
	private String insuranceNo;

	@ApiModelProperty(value = "产品id", required = true)
	private String productId;

	@ApiModelProperty(value = "产品名称", required = true)
	private String productName;

	@ApiModelProperty(value = "方案id", required = true)
	private String caseId;

	@ApiModelProperty(value = "方案名称", required = true)
	private String caseName;

	@ApiModelProperty(value = "金额")
	private String totalPrice;
	/**
	 * 保额
	 */
	@ApiModelProperty(value = "保额")
	private String totalInsuranceAmount;

	/**
	 * 费率
	 */
	@ApiModelProperty(value = "费率")
	private BigDecimal rate;

	@ApiModelProperty(value = "起保日期")
	private String startDate;

	@ApiModelProperty(value = "终保日期")
	private String endDate;
	/**
	 * 手机号
	 */
	@ApiModelProperty(value = "电话号")
	private String telephone;

	/**
	 * 身份证号
	 */
	@ApiModelProperty(value = "证件号")
	private String idCard;

	/**
	 * 投保人id
	 */
	@ApiModelProperty(value = "投保人id")
	private String applyUserId;

	/**
	 * 投保人姓名
	 */
	@ApiModelProperty(value = "投保人姓名")
	private String applyUserName;

	/**
	 * 投保人电话号
	 */
	@ApiModelProperty(value = "投保人电话号")
	private String applyTelephone;

	/**
	 * 投保人证件号
	 */
	@ApiModelProperty(value = "投保人证件号")
	private String applyCardNo;

	@ApiModelProperty(value = "创建时间")
	private Date createTime;

	@ApiModelProperty(value = "投保人姓名")
	private String createPersonName;

	@ApiModelProperty(value = "投保人id")
	private String createPersonId;

	@ApiModelProperty(value = "保险公司")
	private String insuranceCompany;

	/**
	 * 承保时间
	 */
	@ApiModelProperty(value = "承保时间")
	private Date acceptTime;

	@ApiModelProperty(value = "在线电子保单地址")
	private String onlineUrl;

	/**
	 * 原保单
	 */
	@ApiModelProperty(value = "原保单")
	private String originalInsuranceNo;
	/**
	 * 被保险人或物品等
	 */
	@ApiModelProperty(value = "被保险人或物品等")
	private String insuredName;

	@ApiModelProperty(value = "状态")
	private String state;

	@ApiModelProperty(value = "企业信息")
	private AuthenticationEnterpriseDto enterprise;

	@ApiModelProperty(value = "投保单id字符串")
	private String proposalIdStr;

	@ApiModelProperty(value = "产品id字符串")
	private String productIdStr;

	@ApiModelProperty(value = "方案id字符串")
	private String caseIdStr;

	/**
	 * 开票状态
	 * 0:未开票  1:已申请  2:已开票  3:开票失败
	 */
	@ApiModelProperty(value = "开票状态", notes = "0:未开票  1:已申请  2:已开票  3:开票失败")
	private String invoiceStatus;

	public String getProposalIdStr() {
		return this.proposalId != null ? String.valueOf(this.proposalId) : "";
	}

	public String getProductIdStr() {
		return this.productId != null ? String.valueOf(this.productId) : "";
	}

	public String getCaseIdStr() {
		return this.caseId != null ? String.valueOf(this.caseId) : "";
	}

}
